home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
doom
/
turric03.zip
/
TURRIC03.ZIP
/
PROGS
/
M-WIZARD.QC
< prev
next >
Wrap
Text File
|
1997-01-30
|
9KB
|
262 lines
/*
==============================================================================
WIZARD MORPH
==============================================================================
*/
$cd /raid/quake/id1/models/a_wizard
$origin 0 0 24
$base wizbase
$skin wizbase
$frame hover1 hover2 hover3 hover4 hover5 hover6 hover7 hover8
$frame hover9 hover10 hover11 hover12 hover13 hover14 hover15
$frame fly1 fly2 fly3 fly4 fly5 fly6 fly7 fly8 fly9 fly10
$frame fly11 fly12 fly13 fly14
$frame attack1 attack2 attack3 attack4 attack5 attack6 attack7
$frame attack8 attack9 attack10 attack11 attack12 attack13
$frame pain1 pain2 pain3 pain4
$frame death1 death2 death3 death4 death5 death6 death7 death8
void() player_wizard_stand = [ $hover1, player_stand1 ] {
if(self.walkframe >= 15)
self.walkframe = 0;
self.frame = $hover1 + self.walkframe;
self.walkframe = self.walkframe + 1;
};
void() player_wizard_run = [ $fly1, player_run ] {
if(self.walkframe >= 14)
self.walkframe=0;
self.frame = $fly1 + self.walkframe;
self.walkframe = self.walkframe + 1;
};
void() player_wizard_jump = {
self.velocity_z = 200;
//** PATCH_BEGIN - morph2 - Turrican ****
// Wiz_idlesound();
sound (self, CHAN_VOICE, "wizard/wjump.wav", 1, ATTN_NORM);
//** PATCH_END - morph2 - Turrican ******
};
////////////////////////////////////////////
// 4 frames of pain for player_wizard, going to player_stand1
////////////////////////////////////////////
void() player_wizard_pain1 = [ $pain1, player_wizard_pain2 ]
//** PATCH_BEGIN - morph2 - Turrican ****
{
PainSound();
self.pain_finished = time + 0.3;
self.attack_finished = time + 0.3;
// sound (self, CHAN_VOICE, "wizard/wpain.wav", 1, ATTN_NORM);
};
//** PATCH_END - morph2 - Turrican ******
void() player_wizard_pain2 = [ $pain2, player_wizard_pain3 ] { };
void() player_wizard_pain3 = [ $pain3, player_wizard_pain4 ] { };
void() player_wizard_pain4 = [ $pain4, player_stand1 ] { };
void() player_Wiz_FastFire = {
local float offset;
local entity missile;
local vector dir;
if(random()>0.75) offset=0;
else if(random()>0.5) offset=0-(random()*10);
else offset=random()*10;
dir=self.v_angle;
dir_y=dir_y+offset;
// self.punchangle_x = -2;
missile = spawn ();
missile.owner = self;
missile.movetype = MOVETYPE_FLYMISSILE;
missile.solid = SOLID_BBOX;
// set missile speed
missile.origin = self.origin;
makevectors (dir);
// missile.velocity = aim(self, 600);
missile.velocity = normalize(v_forward);
missile.velocity = missile.velocity * 1000;
missile.angles = vectoangles(missile.velocity);
missile.classname = "wizspike";
setmodel(missile, "progs/w_spike.mdl");
setsize(missile, '0 0 0', '0 0 0');
missile.touch = spike_touch;
};
////////////////////////////////////////////
// 13 frames of attack for player_wizard, going to player_stand1
////////////////////////////////////////////
/*
void() player_wizard_attack1 = [ $attack1, player_wizard_attack2 ] { self.attack_finished = time + 1.5; };
void() player_wizard_attack2 = [ $attack2, player_wizard_attack3 ] { };
void() player_wizard_attack3 = [ $attack3, player_wizard_attack4 ] { };
void() player_wizard_attack4 = [ $attack4, player_wizard_attack5 ] { };
void() player_wizard_attack5 = [ $attack5, player_wizard_attack6 ] { };
void() player_wizard_attack6 = [ $attack6, player_wizard_attack7 ] { };
void() player_wizard_attack7 = [ $attack7, player_wizard_attack8 ] { };
void() player_wizard_attack8 = [ $attack8, player_wizard_attack9 ] { };
void() player_wizard_attack9 = [ $attack9, player_wizard_attack10 ] { };
void() player_wizard_attack10 = [ $attack10, player_wizard_attack11 ] { };
void() player_wizard_attack11 = [ $attack11, player_wizard_attack12 ] { sound(self, CHAN_WEAPON, "wizard/wattack.wav", 1, ATTN_NORM);};
void() player_wizard_attack12 = [ $attack12, player_wizard_attack13 ] {player_Wiz_FastFire(-10); };
void() player_wizard_attack13 = [ $attack13, player_stand1 ] { player_Wiz_FastFire(-10);};
*/
void() player_wizard_attack1 = [ $attack1, player_wizard_attack3 ] { self.attack_finished = time + 1.0; };
void() player_wizard_attack2 = [ $attack3, player_wizard_attack3 ] { };
void() player_wizard_attack3 = [ $attack5, player_wizard_attack4 ] { };
void() player_wizard_attack4 = [ $attack7, player_wizard_attack5 ] { sound(self, CHAN_WEAPON, "wizard/wattack.wav", 1, ATTN_NORM); };
void() player_wizard_attack5 = [ $attack9, player_wizard_attack6 ] { player_Wiz_FastFire(); };
void() player_wizard_attack6 = [ $attack11, player_wizard_attack7 ] { player_Wiz_FastFire(); };
void() player_wizard_attack7 = [ $attack13, player_stand1 ] { player_Wiz_FastFire();};
string() player_wizard_killmsg = {
return " was scragged by ";
};
string() player_wizard_killmsg2 = {
return ".\n";
};
//** PATCH_BEGIN - morph2 - Turrican ****
void() player_wiz_death1 =[ $death1, player_wiz_death2 ]
{
// Stop the scrag from flying.
if (self.flags & FL_FLY)
{
localcmd("fly");
self.flags = self.flags - FL_FLY;
}
};
void() player_wiz_death2 =[ $death2, player_wiz_death3 ] {};
void() player_wiz_death3 =[ $death3, player_wiz_death4 ] {};
void() player_wiz_death4 =[ $death4, player_wiz_death5 ] {};
void() player_wiz_death5 =[ $death5, player_wiz_death6 ] {};
void() player_wiz_death6 =[ $death6, player_wiz_death7 ] {};
void() player_wiz_death7 =[ $death7, player_wiz_death8 ] {};
void() player_wiz_death8 =[ $death8, player_wiz_death8 ]
//** PATCH_BEGIN - gibbin3 - Turrican ****
{
PlayerDead();
MakePlayerCorpse (self.max_health * self.health_modifier * 0.65,
'-32 -32 -24', '32 32 -12');
};
//** PATCH_END - gibbin3 - Turrican ******
void () player_wizard_die =
{
self.items = self.items - (self.items & IT_INVISIBILITY);
self.invisible_finished = 0; // don't die as eyes
self.invincible_finished = 0;
self.super_damage_finished = 0;
self.radsuit_finished = 0;
self.view_ofs = '0 0 -8';
self.deadflag = DEAD_DYING;
self.flags = self.flags - (self.flags & FL_ONGROUND);
self.movetype = MOVETYPE_TOSS;
if (self.velocity_z < 10)
self.velocity_z = self.velocity_z + random()*300;
//** PATCH_BEGIN - gibbin3 - Turrican ****
// Pass player size and head.mdl to Corpse_die using globals.
self.corpse_size = SIZE_MEDIUM;
self.head_gib_name = "progs/h_wizard.mdl";
//** PATCH_END - gibbin3 - Turrican ******
// check for gib
if (self.health < -40)
{
//** PATCH_BEGIN - gibbin3 - Turrican ****
Corpse_die();
//** PATCH_END - gibbin3 - Turrican ******
return;
}
DeathSound();
self.angles_x = 0;
self.angles_z = 0;
// regular death
player_wiz_death1();
};
//** PATCH_END - morph2 - Turrican ******
void() player_wizard_become = {
//** PATCH_BEGIN - morph2 - Turrican ****
// bprint(self.netname);
// bprint(" has become a scrag.\n");
sprint( self, "You have become a scrag.\n");
// Make the scrag fly if it is not already.
if(!(self.flags & FL_FLY))
{
localcmd("fly");
self.flags = self.flags | FL_FLY;
}
self._die = player_wizard_die;
//** PATCH_END - morph2 - Turrican ******
self._stand=player_wizard_stand;
self._run=player_wizard_run;
self._pain=player_wizard_pain1;
//** PATCH_BEGIN - morph2 - Turrican ****
// self._jump=player_wizard_jump;
// self._jump2=player_wizard_jump;
self._jump=SUB_Null;
self._jump2=SUB_Null;
//** PATCH_END - morph2 - Turrican ******
self._attack=player_wizard_attack1;
self._impulse=SUB_Nop;
self._can_get_p=SUB_False;
self._killmsg=player_wizard_killmsg;
self._killmsg2=player_wizard_killmsg2;
setmodel(self,"progs/wizard.mdl");
self.modelindex_morph=self.modelindex;
self.weaponmodel = "";
//** PATCH_BEGIN - morph2 - Turrican ****
self.view_ofs = '0 0 22';
if(!deathmatch)
setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);
else
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
//** PATCH_END - morph2 - Turrican ******
self.health = self.health * 2.0 / self.health_modifier;
self.health_modifier = 2.0;
makevectors(self.v_angle);
spawn_tfog(self.origin + 20 * v_forward);
DropBackpack2();
//** PATCH_BEGIN - morph2 - Turrican ****
self.currentammo = 0;
self.weapon = WIZARD_MISSILES;
// Make morphs ignore player colors.
if (self.colormap != 0)
{
self.temp_colormap = self.colormap;
self.colormap = 0;
}
// Make morphs ignore player skins.
if (self.skin != 0)
{
self.temp_skin = self.skin;
self.skin = 0;
}
//** PATCH_END - morph2 - Turrican ******
};